﻿//
// This file is part of AVSReflector project
// Copyright (C) 2011 Yuan Pengfei
//

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace AVSReflector
{
    public partial class Player : Form
    {
        Bitmap[] images;
        int pos;

        public Player(Bitmap[] img)
        {
            InitializeComponent();
            images = img;
            pos = 0;
            if (images != null && images.Length > 0)
                timer.Enabled = true;
            // TODO: Set the fps
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            pos++;
            if(pos >= images.Length)
                pos = 0;
            movie.Image = images[pos];
            movie.Invalidate();
        }
    }
}
